[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------+#################################################################
#+-| M_EDIT |-------------------------------------+###########################
#| +--------+ A full-screen editor for memo_field |###########################
#+------------------------------------------------+###########################
##############################################################################
##############################################################################
#+--| Summary |--------------+################################################
#| #INCLUDE memo.hdr |################################################
#+---------------------------+################################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------------------------------------+####
#| PROCEDURE m_edit PROTOTYPE |####
#| PARAMETERS MEMO memo_field, VALUE UINT row, VALUE UINT col,; |####
#| VALUE UINT row1, VALUE UINT col1, VALUE LOGICAL display_only |####
#+-----------------------------------------------------------------------+####
##############################################################################
##############################################################################
#######+---| Description |--------------------------------------------+#######
#######| The m_edit procedure is a full-screen editor for memo_field. |#######
#######| If the value parameter display_only is TRUE, then the |#######
#######| memo_field is displayed. |#######
#######| ------------------------------------------------------------ |#######
#######| The first editable character position is at row, col. The |#######
#######| m_edit procedure neither saves the screen before writing the |#######
#######| memo nor draws a box. Use savescreen(), fill and @...TO to |#######
#######| save an area of the screen and to draw a box. |#######
#######| ------------------------------------------------------------ |#######
#######| The memo field is opened and closed by the m_edit procedure, |#######
#######| therefore you do not need to open a memo through the m_open |#######
#######| procedure prior to using m_edit. |#######
#######| ------------------------------------------------------------ |#######
#######| see the EDIT KEYS TABLE for a listing of m_edit() keys. |#######
#######+--------------------------------------------------------------+#######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Edit a customer's memo field. |#########
#########| |#########
#########| SEEK customer_name |#########
#########| m_edit( cust->notes, 0, 0, 10, 20, .F. ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Display a memo field on the last |#########
#########| * three lines of the screen. |#########
#########| |#########
#########| s = savescreen() |#########
#########| fill( 19,0,24,79,&DOUBLE_BOX," ",c1,c2,0) |#########
#########| m_edit( z->m, 19, 0, 24, 79, .T. ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * A generic function that edits a memo. |#########
#########| |#########
#########| PROCEDURE edit_memo |#########
#########| PARAMETER MEMO mname |#########
#########| VARDEF |#########
#########| INT s |#########
#########| ENDDEF |#########
#########| |#########
#########| *--- save the screen and draw a shadow box |#########
#########| |#########
#########| s = savescreen( 3, 50, 14, 75 ) |#########
#########| fill( 3, 50, 14, 75, &DOUBLE_BOX," ",c,b,6 ) |#########
#########| |#########
#########| *--- edit the memo. Note...two lines on the right |#########
#########| * and the bottom are needed for the shadow. |#########
#########| |#########
#########| m_edit( mname, 4, 51, 12, 73 ) |#########
#########| restorescrn( s ) |#########
#########| |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
m_close
m_eof()
m_exist()
m_getln
m_open
...
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson